<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title>地面新增</title>

</head>

<body>
	<div class="contentt" style="min-height: 550px;">
		<form class="cmxform" id="CheckReceiveFloorAddForm" method="post"
			action="customer/floor/add">
			<input type="hidden" id="checkReceiveFloorAdd_articleId">
			<div class="top"
				style="border-bottom: 1px solid gray;height: 35px;margin-bottom: 15px">
				<span class="style_btn" style="width:100px;">地面</span>
			</div>
			<div class="main-top">
				<div style="width: 100%;">
					<table width="100%">
						<tr>
							<td class="leftt"><span class="style_btn"
								style="width:100px;">装饰材料</span></td>
							<td width="360">
								<select id="decorativeMaterials" name="decorateMaterials" style="width:150px;">
									<option value="" selected="selected" >请选择</option>
									<!-- <option value="石材">石材</option>
									<option value="砖材">砖材</option>
									<option value="实木">实木</option>
									<option value="复合木">复合木</option>
									<option value="地毯">地毯</option>
									<option value="地毡">地毡</option>
									<option value="玻璃">玻璃</option> -->
								</select>
							</td>

							<td
								class="leftt xuanguanHide cantingHide chufangHide chuwujianHide weishengjianHide yangtaiHide pingtaiHide"><span
								class="style_btn" style="width:100px;">楼梯</span></td>
							<td width="360"
								class="xuanguanHide cantingHide chufangHide chuwujianHide weishengjianHide yangtaiHide pingtaiHide">
								<select id="stairMaterial" name="stairsMaterials" style="width:150px;">
									<option value="" selected="selected" >请选择</option>
									<!-- <option value="石材">石材</option>
									<option value="木结构">木结构</option>
									<option value="钢结构">钢结构</option>
									<option value="钢木结构">钢木结构</option>
									<option value="钢玻结构">钢玻结构</option> -->
								</select>
							</td>
						</tr>
						<tr>
							<td class="leftt"></td>
							<td><input type="text" name="decorateMaterialsInfo">
								<!-- 地面_装饰材料  上传按钮 -->
								<div id='filePicker_zscl' style="display:none">上传</div>
							</td>
							<td
								class="leftt  xuanguanHide cantingHide chufangHide chuwujianHide weishengjianHide yangtaiHide"></td>
							<td
								class="xuanguanHide pingtaiHide cantingHide chufangHide chuwujianHide weishengjianHide yangtaiHide"><input
								type="text" name="stairsMaterialsInto"> <!--地面_楼梯材料 上传按钮 -->
								<div id='filePicker_ltcl' style="display:none">上传</div>
							</td>
						</tr>
						<tr valign="top" >
							<td colspan="2" width="50%">
								<!-- 附件上传 地面_装饰材料。。。--> <!-- 缩略图容器 -->
								<div id='list_zscl'></div>
							</td>
							<td colspan="2" width="50%" class="pingtaiHide">
								<!-- 附件上传 地面_楼梯材料。。。--> <!-- 缩略图容器 -->
								<div id='list_ltcl'></div>
							</td>
						</tr>
						<tr class="pingtaiHide">
							<td class="leftt yangtaiHide"><span class="style_btn "
								style="width:100px;">地面承载</span></td>
							<td class="yangtaiHide"><input type="text" name="floorLoad">
								<!-- 地面_地面承载 上传按钮 -->
								<div id='filePicker_dmcz' style="display:none">上传</div>
							</td>

							<td class="leftt"><span class="style_btn xuanguanHide "
								style="width:100px;">地板采暖</span></td>
							<td class="xuanguanHide"><input type="text"
								name="floorHeating"> <!--地面_地面采暖 上传按钮 -->
								<div id='filePicker_dbcn' style="display:none">上传</div>
							</td>
						</tr>
						<tr class=" pingtaiHide">
							<td colspan="2" class="yangtaiHide">
								<!-- 附件上传 地面_地面承载。。。  --> <!-- 缩略图容器 -->
								<div id='list_dmcz'></div>
							</td>
							<td colspan="2" class="xuanguanHide">
								<!-- 附件上传 地面_地面采暖。。。  --> <!-- 缩略图容器 -->
								<div id='list_dbcn'></div>
							</td>
						</tr>
						<tr
							class="xuanguanHide chufangHide weishengjianHide yangtaiHide pingtaiHide">
							<td class="leftt"><span class="style_btn"
								style="width:100px;">地面插座</span></td>
							<td></td>

						</tr>
						<tr class="xuanguanHide chufangHide yangtaiHide pingtaiHide">
							<td class="leftt">电源</td>
							<td><input type="text" name="powerSocket"> <!--地面_电源 上传按钮 -->
								<div id='filePicker_dy' style="display:none">上传</div></td>

							<td class="leftt">电话</td>
							<td><input type="text" name="phoneSocket"> <!-- 电话上传按钮 -->
								<div id='filePicker_dh' style="display:none">上传</div></td>

						</tr>
						<tr  class="chufangHide yangtaiHide pingtaiHide">
							<td colspan="2">
								<!-- 附件上传 地面_电源。。。  --> <!-- 缩略图容器 -->
								<div id='list_dy'></div>
							</td>

							<td colspan="2">
								<!-- 附件上传 地面_电话。。。 缩略图容器 --> <!--缩略图容器-->
								<div id='list_dh'></div>
							</td>
						</tr>
						<tr class="xuanguanHide chufangHide yangtaiHide pingtaiHide">
							<td class="leftt">网络</td>
							<td><input type="text" name="networkSocket"> <!-- 地面_网络 上传按钮 -->
								<div id='filePicker_wl' style="display:none">上传</div></td>

							<td class="leftt">音频</td>
							<td><input type="text" name="voiceSocket"> <!-- 地面_音频 上传按钮 -->
								<div id='filePicker_yp' style="display:none">上传</div></td>
						</tr>
						<tr class="chufangHide yangtaiHide pingtaiHide">
							<td colspan="2">
								<!-- 附件上传 地面_网络。。。  --> <!-- 缩略图容器 -->
								<div id='list_wl'></div>
							</td>

							<td colspan="2">
								<!-- 附件上传 地面_音频。。。  --> <!-- 缩略图容器 -->
								<div id='list_yp'></div>
							</td>
						</tr>
						<tr class="xuanguanHide chufangHide yangtaiHide pingtaiHide">
							<td class="leftt">视频</td>
							<td><input type="text" name="videoSocket"> <!--地面_视频 上传按钮 -->
								<div id='filePicker_sp' style="display:none">上传</div></td>

						</tr>
						<tr  class="chufangHide yangtaiHide pingtaiHide">
							<td colspan="2">
								<!-- 附件上传 地面_视频。。。  --> <!-- 缩略图容器 -->
								<div id='list_sp'></div>
							</td>

						</tr>

						<tr class="xuanguanHide qijushiHide cantingHide chuwujianHide ">
							<td class="leftt pingtaiHide"><span class="style_btn"
								style="width:100px;">地漏</span></td>
							<td class="pingtaiHide"><input type="text"
								name="floorFunnel"> <!-- 地漏上传按钮 -->
								<div id='filePicker_dLcz' style="display:none">上传</div>
							</td>

							<td class="leftt chufangHide weishengjianHide"><span
								class="style_btn" style="width:100px;">排水口</span></td>
							<td class="chufangHide weishengjianHide"><input type="text"
								name="floorDrain"> <!--地面_排水口 上传按钮 -->
								<div id='filePicker_drcz' style="display:none">上传</div>
							</td>
						</tr>
						<tr valign="top" class="xuanguanHide qijushiHide cantingHide chuwujianHide ">
							<td colspan="2" width="50%" class="pingtaiHide">
								<!-- 附件上传 地漏。。。--> <!-- 缩略图容器 -->
								<div id='list_dLcz'></div>
							</td>
							<td colspan="2" width="50%" class="chufangHide weishengjianHide">
								<!-- 附件上传 排水口。。。--> <!-- 缩略图容器 -->
								<div id='list_drcz'></div>
							</td>
						</tr>
					</table>
				</div>
				<!-- 修改时添加变更说明 -->
				<div style="margin:10px;display:none;" id="dl_div" >
					变更说明<textarea rows="3" name="remark" id="dlRemark" style="width:70%"></textarea><span style="color:red;">*</span>
				</div>
				<div style="width:100%;text-align:center; padding-top:20px"
					class="anniu">
					<shiro:hasPermission name="permission:edit"> 
						<button class="btn btn-danger radius" style="display: none;"
							id="decorationLandEdit" onclick="decorationLandSubmit(this);"
							type="button">启用编辑</button>
					</shiro:hasPermission> 
					<button class="btn btn-danger radius" id="decorationLandTijiao"
						onclick="decorationLandSubmit(this);" type="button">提交</button>
					<button class="btn btn-danger radius" id="decorationLandOk"
						onclick="decorationLandSubmit(this);" type="button">保存</button>
					
					<a class="btn btn-default radius" id="decorationLandReset"
						onClick="resetForm(this);">重置</a> <br /> <br />
				</div>
				<!-- anniu end -->
			</div>
			<!-- main end  -->
		</form>
		<div style="padding: 5px" class="changeTable">
			<!-- 信用信息更改字段列表 -->
			<table id="decLandChageTable"   style="table-layout:fixed"></table>
		</div>
	</div>
	<!--contentt end  -->
	<script type="text/javascript">
		//操作字段，0：临时保存；1：新增；2：修改
		var optDecorationLand = 0;
		var decorationLandId; //地面id用来修改数据
		//var landArray=new Array();//待删除图片id集合
		$(function() {
			mySubmit("CheckReceiveFloorAddForm", saveCheckReceiveFloor, CheckReceiveFloorAddSuccess);
			//初始化上传插件
			//参数说明：上传按钮id、缩略图容器id、物件id、存放上传文件信息隐藏域id、成功回调、失败回调
			initWebUpload("filePicker_zscl", "list_zscl", "装修验收地面_装饰材料", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			initWebUpload("filePicker_dmcz", "list_dmcz", "装修验收地面_地面承载", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			initWebUpload("filePicker_dbcn", "list_dbcn", "装修验收地面_地板采暖", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			initWebUpload("filePicker_dy", "list_dy", "装修验收地面_电源", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			initWebUpload("filePicker_dh", "list_dh", "装修验收地面_电话", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			initWebUpload("filePicker_wl", "list_wl", "装修验收地面_网络", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			initWebUpload("filePicker_yp", "list_yp", "装修验收地面_音频", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			initWebUpload("filePicker_sp", "list_sp", "装修验收地面_视频", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			initWebUpload("filePicker_ltcl", "list_ltcl", "装修验收地面_楼梯材料", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			initWebUpload("filePicker_dLcz", "list_dLcz", "装修验收地面_地漏", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			initWebUpload("filePicker_drcz", "list_drcz", "装修验收地面_排水口", "checkReceiveFloorAdd_articleId", checkReceiveFloorSuccess, checkReceiveFloorErr);
			//给上传按钮默认宽高
			$("div[id^='filePicker_'] div").css({
				"width" : "60px",
				"height" : "30px"
			});
		//初始化表格,动态从服务器加载数据  
		 $("#decLandChageTable").bootstrapTable({
				method : "post", //使用get请求到服务器获取数据  
				url : "customer/floor/getDecLandChangeList", //获取数据的Servlet地址  
				striped : true, //表格显示条纹  
				pagination : true, //启动分页  
				pageSize : 2, //每页显示的记录数  
				pageNumber : 1, //当前第几页  
				pageList : [ 5, 10, 15, 20, 25 ], //记录数可选列表  
				sidePagination : "server", //表示服务端请求  
				contentType : 'application/x-www-form-urlencoded',
				//设置为undefined可以获取pageNumber，pageSize，searchText，sortName，sortOrder  
				//设置为limit可以获取limit, offset, search, sort, order  
				queryParamsType : "undefined",
				queryParams : function queryParams(params) { //设置查询参数  
					var param = {
						pageNumber : params.pageNumber,
						pageSize : params.pageSize,
						fkcustomerId : fkcustomerId,
						fkroomId : fkroomId
					};
					return param;
				},
				columns : [ {
					field : 'createtime',
					title : '修改时间',
					width : '15%',
					formatter:decLandDataFormat
				}, {
					field : 'fieldname',
					title : '修改字段',
					width : '8%'
				}, {
					field : 'changebefore',
					title : '修改前数据',
					width : '25%',
					formatter:showText	
				}, {
					field : 'changeafter',
					title : '修改后数据',
					width : '25%',
					formatter:showText	
				}, {
					field : 'adduser',
					title : '修改人',
					width : '7%',
				}, {
					field : 'remarks',
					title : '变更说明',
					width : '20%',
					formatter:showText	
				} ]
			}); 
		});
		//日期格式化
		function decLandDataFormat(value, row, index) {
			return new Date(row.createtime).format("yyyy-MM-dd hh:mm:ss");
		}
		//在decorationcheck-add页面初始化
		function initSel2() {
			//先初始化s2中数据 ycl注释，该方法也注释了 后期如果有需求 可以继续使用
			//initStairMaterialData();
			//initDecorativeMaterialsData();
			
			//$("div[id^='filePicker_']").css("display", "inline-block");
			$(".js-example-tags").select2({
				tags : true //可搜索
			})
			/* var s1 = $("#decorativeMaterials").select2({
				placeholder : '请选择材料类型'
			});
			//s.val("玄关").trigger("change");
			var s2 = $("#stairMaterial").select2({
				placeholder : '请选择材料类型'
			}); */
			
		}
		//提交表单
		function decorationLandSubmit(_this) {
			var html = $(_this).html();
			if (html == "启用编辑") {
				if(approvalCountLand == 0){
					layer.confirm('确定开启编辑状态？', {
						offset : '20%',
						shade : 0
					}, function() {
						//删除开启编辑按钮同时显示保存按钮
						$(_this).hide();
						$("#dl_div").show();
						$("#decorationLandOk").css("display", "inline").html("保存修改");
						$("#decorationLandReset").css("display", "inline");
						//解除锁定表单
						$("#CheckReceiveFloorAddForm input").attr("readonly", false);
						$("#CheckReceiveFloorAddForm").find("select").attr("disabled", false);
						$("#CheckReceiveFloorAddForm div[id^='filePicker']").css("display","inline-block");
						$("#CheckReceiveFloorAddForm span.uploadcancel").show();
						layer.close(layer.index);
					});
				}else{
					layer.msg("此条数据已提交过审批，不能重复提交");
				}
			} else if (html == "保存修改") {
				//开始表单提交
				$("#CheckReceiveFloorAddForm").submit();
			} else if (html = "提交") {
				//修改操作字段为提交
				optDecorationLand = 0;
				$("#CheckReceiveFloorAddForm").submit();
			} else if (html = "保存") {
				//修改操作字段为保存态
				optDecorationLand = 1;
				$("#CheckReceiveFloorAddForm").submit();
			}
		}
		var approvalCountLand=0;
		//为表单赋值数据
		function initDecorationLandData(v) {
			approvalCountLand=0;
			//赋值之前先重置表单
			//更改操作字段为临时状态
			optDecorationLand = 0;
			//重置表单
			$("#CheckReceiveFloorAddForm input").val("");
			$("#CheckReceiveFloorAddForm div[id^='list']").find("*").remove();
			$("#CheckReceiveFloorAddForm select[name='decorateMaterials']").val("").trigger("change");
			$("#CheckReceiveFloorAddForm select[name='stairsMaterials']").val("").trigger("change");
			$("#CheckReceiveFloorAddForm  #dl_div").hide();
			//按钮全部隐藏
			$("#decorationLandEdit").css("display", "none");
			$("#decorationLandOk").css("display", "none").html("保存");
			$("#decorationLandTijiao").css("display", "none");
			$("#decorationLandReset").css("display", "none");
			//解锁表单
			$("#CheckReceiveFloorAddForm input").attr("readonly", false);
			$("#CheckReceiveFloorAddForm").find("select").attr("disabled", false);
			$("#CheckReceiveFloorAddForm div[id^='filePicker']").css("display", "inline-block");
			$("#decorationLandEdit").css("display", "none");
			$("#decorationLandTijiao").css("display", "inline");
			$("#decorationLandOk").css("display", "inline");
			$("#decorationLandReset").css("display", "inline");
		
			//开始赋值数据
			if (v) {
				approvalCountLand = v.approvalCount;
				//更改操作字段为修改状态
				optDecorationLand = 2;
				//显示开启编辑按钮,隐藏保存提交
				$("#decorationLandEdit").css("display", "inline");
				$("#decorationLandOk").css("display", "none");
				$("#decorationLandTijiao").css("display", "none");
				$("#decorationLandReset").css("display", "none");
				//锁定表单数据
				$("#CheckReceiveFloorAddForm input").attr("readonly", true);
				$("#CheckReceiveFloorAddForm").find("select").attr("disabled", true);
				//禁止点击上传按钮
				$("#CheckReceiveFloorAddForm div[id^='filePicker']").hide();
				//赋值数据
				decorationLandId = v.id;
				//请求文件数据
				decorationLandGetFile(v.id);
				$("#CheckReceiveFloorAddForm select[name='decorateMaterials']").val(v.decorateMaterials).trigger("change");
				$("#CheckReceiveFloorAddForm input[name='decorateMaterialsInfo']").val(v.decorateMaterialsInfo);
				$("#CheckReceiveFloorAddForm input[name='floorLoad']").val(v.floorLoad);
				$("#CheckReceiveFloorAddForm input[name='floorHeating']").val(v.floorHeating);
				$("#CheckReceiveFloorAddForm input[name='powerSocket']").val(v.powerSocket);
				$("#CheckReceiveFloorAddForm input[name='phoneSocket']").val(v.phoneSocket);
				$("#CheckReceiveFloorAddForm input[name='networkSocket']").val(v.networkSocket);
				$("#CheckReceiveFloorAddForm input[name='voiceSocket']").val(v.voiceSocket);
				$("#CheckReceiveFloorAddForm input[name='videoSocket']").val(v.videoSocket);
				$("#CheckReceiveFloorAddForm select[name='stairsMaterials']").val(v.stairsMaterials).trigger("change");
				$("#CheckReceiveFloorAddForm input[name='stairsMaterialsInto']").val(v.stairsMaterialsInto);
				$("#CheckReceiveFloorAddForm input[name='floorFunnel']").val(v.floorFunnel);
				$("#CheckReceiveFloorAddForm input[name='floorDrain']").val(v.floorDrain);
				
			}
			//如果是历史状态，所有按钮都设置不能操作
			if(historyStatus==1){
				$("#decorationLandEdit").css("display", "none");
				$("#decorationLandOk").css("display", "none");
				$("#decorationLandTijiao").css("display", "none");
				$("#decorationLandReset").css("display", "none");
				//锁定表单数据
				$("#CheckReceiveFloorAddForm input").attr("readonly", true);
				$("#CheckReceiveFloorAddForm").find("select").attr("disabled", true);
				$("#CheckReceiveFloorAddForm div[id^='filePicker_']").css("display", "none");
			}
		}
		//获取地面文件数据
		function decorationLandGetFile(id) {
			getFileList(id, "装修验收地面_装饰材料", "#list_zscl",landImgRemove, imgPlus);
			getFileList(id, "装修验收地面_地面承载", "#list_dmcz",landImgRemove, imgPlus);
			getFileList(id, "装修验收地面_地板采暖", "#list_dbcn",landImgRemove, imgPlus);
			getFileList(id, "装修验收地面_电源", "#list_dy",landImgRemove, imgPlus);
			getFileList(id, "装修验收地面_电话", "#list_dh",landImgRemove, imgPlus);
			getFileList(id, "装修验收地面_网络", "#list_wl",landImgRemove, imgPlus);
			getFileList(id, "装修验收地面_音频", "#list_yp",landImgRemove, imgPlus);
			getFileList(id, "装修验收地面_视频", "#list_sp",landImgRemove, imgPlus);
			getFileList(id, "装修验收地面_楼梯材料", "#list_ltcl",landImgRemove, imgPlus);
			getFileList(id, "装修验收地面_地漏", "#list_dLcz",landImgRemove, imgPlus);
			getFileList(id, "装修验收地面_排水口", "#list_drcz",landImgRemove, imgPlus);
		}
	
		/*
		 * ycl
		 * 2017/11/21 为了提高性能 直接写死在页面  后期如果有需求可以解锁该代码 使用动态加载
		 */
		//装饰材料下拉选项
		function initDecorativeMaterialsData(decorativeMaterials) {
			var html = "";
			$.each(decorativeMaterials, function(i, v) {
				if(v){
					html = "<option value=\"" + v + "\">" + v + "</option>";
					$("#decorativeMaterials").append(html);
				}
			});
			$("#decorativeMaterials").select2({
				tags : true
			});
		}
		//楼梯材料下拉选项
		function initStairMaterialData(stair) {
			var html = "";
			$.each(stair, function(i, v) {
				if(v){
					html = "<option value=\"" + v + "\">" + v + "</option>";
					$("#stairMaterial").append(html);
				}
			});
			$("#stairMaterial").select2({
				tags : true
			});
		
			
		}
		
		
		function saveCheckReceiveFloor() {
			var land = layer.load(2);
			var roomType = $("#roomType").val();
			var fkcustomerId = parent.$("#customerId").val();
			var fkroomId = parent.$("#roomId").val();
			var decorateMaterials = $("#CheckReceiveFloorAddForm select[name='decorateMaterials']").val();
			var decorateMaterialsInfo = $("#CheckReceiveFloorAddForm input[name='decorateMaterialsInfo']").val();
			var floorLoad = $("#CheckReceiveFloorAddForm input[name='floorLoad']").val();
			var floorHeating = $("#CheckReceiveFloorAddForm input[name='floorHeating']").val();
			var powerSocket = $("#CheckReceiveFloorAddForm input[name='powerSocket']").val();
			var phoneSocket = $("#CheckReceiveFloorAddForm input[name='phoneSocket']").val();
			var networkSocket = $("#CheckReceiveFloorAddForm input[name='networkSocket']").val();
			var voiceSocket = $("#CheckReceiveFloorAddForm input[name='voiceSocket']").val();
			var videoSocket = $("#CheckReceiveFloorAddForm input[name='videoSocket']").val();
			var stairsMaterials = $("#CheckReceiveFloorAddForm select[name='stairsMaterials']").val();
			var stairsMaterialsInto = $("#CheckReceiveFloorAddForm input[name='stairsMaterialsInto']").val();
			var AccessoryCaList = $("#checkReceiveFloorAdd_articleId").val();
			var floorFunnel = $("#CheckReceiveFloorAddForm input[name='floorFunnel']").val();
			var floorDrain = $("#CheckReceiveFloorAddForm input[name='floorDrain']").val();
			var remark = $("#dlRemark").val();
			if(optDecorationLand == "2"){
				if(remark == "" || remark == undefined){
					layer.msg("变更说明不能为空");
					layer.close(land);
					return null;
				}
			}
			return {
				opt : optDecorationLand,
				remark : remark,
				id : decorationLandId,
				waitDelFile:landArray,
				fkcustomerId : fkcustomerId,
				fkroomId : fkroomId,
				roomType : roomType,
				decorateMaterials : decorateMaterials,
				decorateMaterialsInfo : decorateMaterialsInfo,
				floorLoad : floorLoad,
				floorHeating : floorHeating,
				powerSocket : powerSocket,
				phoneSocket : phoneSocket,
				networkSocket : networkSocket,
				voiceSocket : voiceSocket,
				videoSocket : videoSocket,
				stairsMaterials : stairsMaterials,
				stairsMaterialsInto : stairsMaterialsInto,
				floorFunnel : floorFunnel,
				floorDrain : floorDrain,
				AccessoryCaList : AccessoryCaList
			}
		}
		function CheckReceiveFloorAddSuccess(responseText) {
			layer.close(layer.index);
			if (responseText.success) {
				layer.alert("保存成功！", {
					offset:'20%',
					shade:[0.1,'#fff']
				}, function() {
					parent.tabToken=3;
					parent.houseType=$("#roomType").val();
					location.reload();
				});
			} else {
				layer.alert('保存失败！');
			}
		}
	
		//上传成功回调
		function checkReceiveFloorSuccess(file, response) {
			successImg(file.id);
		}
		//上传失败回调
		function checkReceiveFloorErr(file, data) {
			//alert("上传失败回调");
		}
		//图片删除按钮事件 landArray
		function landImgRemove(id,_this){
			layer.confirm('删除该图片？',{
				title:'警告',
				icon:0,
				shade:[0.1, '#fff']
			},function(){
				landArray.push(id);
				//删除指定缩略图
				$("#"+id).remove();
				layer.close(layer.index);
			});
		}
		
	</script>
</body>
</html>
